package com.wmyg.antifake.service;

import com.github.pagehelper.PageInfo;
import com.wmyg.antifake.bean.QRInfo;
import com.wmyg.antifake.bean.Qrcode;
import com.wmyg.antifake.bean.QueryInfo;
import com.wmyg.antifake.bean.UnitInfo;
import com.wmyg.antifake.message.Message;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;

public interface FabricService {

    Message enterTotalList(List<UnitInfo> items, String producer);

    Message track(String qR, QueryInfo queryInfo, HttpServletRequest request);

    Future<Map<String,Object>> genCodes (UnitInfo uParam,  String[] packArr,String[] sNumArr,String userId,Long qrcodeId);

    PageInfo<Qrcode> findQrCode(Qrcode qrcode);

    Qrcode findPrimaryId(Long qrCodeId);

    int insertOrUpdate(Qrcode qrcode);

    int deleteQrCode(Long qrCodeId);

    QRInfo sendTrackMessage(String qR, QueryInfo queryInfo) throws Throwable;

    Message trackDetached(String qR, QueryInfo queryInfo, HttpServletRequest request);
}
